import { createApp } from 'vue'
//import './style.css'
import App from './App.vue'
import router from './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import myConfirm from './utils/myConfirm'
import { createPinia } from 'pinia'
import * as echarts from 'echarts'
//实例化pinia
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

// createApp(App).mount('#app')
const app =createApp(App);
app.use(ElementPlus,{
    locale:zhCn,
}).use(router).use(pinia).mount('#app')
for (const [key,component]of Object.entries(ElementPlusIconsVue)){
    app.component(key,component)
}
//全局注册
app.config.globalProperties.$myconfirm = myConfirm
app.config.globalProperties.$echarts = echarts;
